<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>trunk.BIP.Bayes.Melding</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="trunk.BIP-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/bayesian-inference">Project Homepage</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;trunk ::
        <a href="trunk.BIP-module.html">Package&nbsp;BIP</a> ::
        <a href="trunk.BIP.Bayes-module.html">Package&nbsp;Bayes</a> ::
        Module&nbsp;Melding
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module Melding</h1><p class="nomargin-top"><span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html">source&nbsp;code</a></span></p>
<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="trunk.BIP.Bayes.Melding.FitModel-class.html" class="summary-name">FitModel</a><br />
      Fit a model to data generating
Bayesian posterior distributions of input and
outputs of the model.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="trunk.BIP.Bayes.Melding.Meld-class.html" class="summary-name">Meld</a><br />
      Bayesian Melding class
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="trunk.BIP.Bayes.Melding-module.html#basicfit" class="summary-sig-name">basicfit</a>(<span class="summary-sig-arg">s1</span>,
        <span class="summary-sig-arg">s2</span>)</span><br />
      Calculates a basic fitness calculation between a model-
generated time series and a observed time series.
it uses a Mean square error.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#basicfit">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="trunk.BIP.Bayes.Melding-module.html#clearNaN" class="summary-sig-name">clearNaN</a>(<span class="summary-sig-arg">obs</span>)</span><br />
      Loops through an array with data series as columns, and
Replaces NaNs with the mean of the other series.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#clearNaN">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="trunk.BIP.Bayes.Melding-module.html#enumRun" class="summary-sig-name">enumRun</a>(<span class="summary-sig-arg">model</span>,
        <span class="summary-sig-arg">theta</span>,
        <span class="summary-sig-arg">k</span>)</span><br />
      Returns model results plus run number.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#enumRun">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="model_as_ra"></a><span class="summary-sig-name">model_as_ra</span>(<span class="summary-sig-arg">theta</span>,
        <span class="summary-sig-arg">model</span>,
        <span class="summary-sig-arg">phinames</span>)</span><br />
      Does a single run of self.model and returns the results as a record array</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#model_as_ra">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="model"></a><span class="summary-sig-name">model</span>(<span class="summary-sig-arg">theta</span>,
        <span class="summary-sig-arg">n</span>=<span class="summary-sig-default">1</span>)</span><br />
      Model (r,p0, n=1)
Simulates the Population dynamic Model (PDM) Pt = rP0
for n time steps.
P0 is the initial population size.
Example model for testing purposes.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#model">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="plotRaHist"></a><span class="summary-sig-name">plotRaHist</span>(<span class="summary-sig-arg">arr</span>)</span><br />
      Plots a record array
as a panel of histograms</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#plotRaHist">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="main2"></a><span class="summary-sig-name">main2</span>()</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#main2">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="mh_test"></a><span class="summary-sig-name">mh_test</span>()</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#mh_test">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="Viz"></a><span class="summary-name">Viz</span> = <code title="False">False</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="dtplot"></a><span class="summary-name">dtplot</span> = <code title="RTplot()">RTplot()</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="phiplot"></a><span class="summary-name">phiplot</span> = <code title="RTplot()">RTplot()</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="thplot"></a><span class="summary-name">thplot</span> = <code title="RTplot()">RTplot()</code>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="basicfit"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">basicfit</span>(<span class="sig-arg">s1</span>,
        <span class="sig-arg">s2</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#basicfit">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  Calculates a basic fitness calculation between a model-
generated time series and a observed time series.
it uses a Mean square error.
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>s1</code></strong> - : model-generated time series. record array.</li>
        <li><strong class="pname"><code>s2</code></strong> - : observed time series. dictionary with keys matching names of s1</li>
    </ul></dd>
    <dt>Returns:</dt>
        <dd>Root mean square deviation between &#180;s1&#180; and &#180;s2&#180;.</dd>
  </dl>
</td></tr></table>
</div>
<a name="clearNaN"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">clearNaN</span>(<span class="sig-arg">obs</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#clearNaN">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  Loops through an array with data series as columns, and
Replaces NaNs with the mean of the other series.
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>obs</code></strong> - : 2-dimensional numpy array</li>
    </ul></dd>
    <dt>Returns:</dt>
        <dd>array of the same shape as obs</dd>
  </dl>
</td></tr></table>
</div>
<a name="enumRun"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">enumRun</span>(<span class="sig-arg">model</span>,
        <span class="sig-arg">theta</span>,
        <span class="sig-arg">k</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="trunk.BIP.Bayes.Melding-pysrc.html#enumRun">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  Returns model results plus run number.
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>model</code></strong> - : model callable</li>
        <li><strong class="pname"><code>theta</code></strong> - : model input list</li>
        <li><strong class="pname"><code>k</code></strong> - : run number</li>
    </ul></dd>
    <dt>Returns:</dt>
        <dd><ul class="rst-simple">
<li>res: result list</li>
<li><code class="link">k</code>: run number</li>
</ul></dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="trunk.BIP-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/bayesian-inference">Project Homepage</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Wed Jan 26 15:29:58 2011
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
